package org.triumphxx.factory.statc;

/**
 * @author:triumphxx
 * @Date:2021/6/6
 * @Time:8:28 下午
 * @微信公众号：北漂码农有话说
 * @网站：http://blog.triumphxx.com.cn
 * @GitHub https://github.com/triumphxx
 * @Desc:
 **/
public class StaticFactory {

    public static Product makeProduct(String flag) {
        if ("A".equals(flag)) {
            return new ProductA();
        }
        if ("B".equals(flag)) {
            return new ProductB();
        }
        return null;
    }
}
